<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>

		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<div id="app">
			用户性别:
			<input type="radio" v-model="gender" :value="options[0]">男
			<input type="radio" v-model="gender" :value="options[1]">女
			<br />
			{{gender}}
		</div>
		
		<script>
			var app = Vue.createApp({
				data() {
					return {
						"message": "Hello Vue!",
						"gender":'',						
						"options":['男','女']
					}
				}
			});
			var vm = app.mount("#app")
		</script>



	</body>
</html>
Gitee - 基于 Git 的代码托管和研发协作平台